home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 002 / chedit.arc / REPLACEC.BUG < prev    next >
Text File  |  1986-07-23  |  2KB  |  56 lines

  1. /*
  2.    This program is placed in the public domain by its author, William Couture.
  3.    Copyright (c) 1986 by DDI.  All Rights Reserved.
  4. */
  5.  
  6. void gchar(char,color)
  7.    int char,color;
  8.    {
  9.    if (color)
  10.       grchar(char,color);
  11.    else
  12.       grchar(160,color);      /* 160 = 32 (a space) + parity.  See the CGRAPH
  13.                                  documentation as to why this works. */
  14.    }
  15.  
  16. void gatchar(row,col,char,color)
  17.    int row,col,char,color;
  18.    {
  19.    if (color)
  20.       grchar(row,col,char,color);
  21.    else
  22.       grchar(row,col,160,color);     /* 160 = 32 (a space) + parity.  See the
  23.                                         CGRAPH documentation as to why this
  24.                                         works. */
  25.    }
  26.  
  27. void printbanner(row,col,msg,length,color)
  28.    int row,col;
  29.    int *msg;
  30.    int length,color;
  31.            /* display a row of graphics characters */
  32.            /* Adding 128 (0x80) to the color will XOR draw the characters on
  33.              top of the existing screen */
  34.    {
  35.    int i;
  36.  
  37.    i = 0;
  38.    while (i < length)
  39.       gatchar(row,col++,msg[i++],color);
  40.    }
  41.  
  42. void printcolumn(row,col,msg,length,color)
  43.    int row,col;
  44.    int *msg;
  45.    int length,color;
  46.            /* display a column of graphics characters */
  47.            /* Adding 128 ($80) to the color will XOR draw the characters on
  48.              top of the existing screen */
  49.    {
  50.    int i;
  51.  
  52.    i = 0;
  53.    while (i < length)
  54.       gatchar(row++,col,msg[i++],color);
  55.    }
  56.